\(\int \cot ^4(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x)) \, dx\) [1104]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 136 \[ \int \cot ^4(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {3 a \text {arctanh}(\cos (c+d x))}{128 d}-\frac {b \cot ^5(c+d x)}{5 d}-\frac {b \cot ^7(c+d x)}{7 d}-\frac {3 a \cot (c+d x) \csc (c+d x)}{128 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{64 d}+\frac {a \cot (c+d x) \csc ^5(c+d x)}{16 d}-\frac {a \cot ^3(c+d x) \csc ^5(c+d x)}{8 d} \]

[Out]

-3/128*a*arctanh(cos(d*x+c))/d-1/5*b*cot(d*x+c)^5/d-1/7*b*cot(d*x+c)^7/d-3/128*a*cot(d*x+c)*csc(d*x+c)/d-1/64*
a*cot(d*x+c)*csc(d*x+c)^3/d+1/16*a*cot(d*x+c)*csc(d*x+c)^5/d-1/8*a*cot(d*x+c)^3*csc(d*x+c)^5/d

Rubi [A] (verified)

Time = 0.16 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2917, 2691, 3853, 3855, 2687, 14} \[ \int \cot ^4(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {3 a \text {arctanh}(\cos (c+d x))}{128 d}-\frac {a \cot ^3(c+d x) \csc ^5(c+d x)}{8 d}+\frac {a \cot (c+d x) \csc ^5(c+d x)}{16 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{64 d}-\frac {3 a \cot (c+d x) \csc (c+d x)}{128 d}-\frac {b \cot ^7(c+d x)}{7 d}-\frac {b \cot ^5(c+d x)}{5 d} \]

[In]

Int[Cot[c + d*x]^4*Csc[c + d*x]^5*(a + b*Sin[c + d*x]),x]

[Out]

(-3*a*ArcTanh[Cos[c + d*x]])/(128*d) - (b*Cot[c + d*x]^5)/(5*d) - (b*Cot[c + d*x]^7)/(7*d) - (3*a*Cot[c + d*x]
*Csc[c + d*x])/(128*d) - (a*Cot[c + d*x]*Csc[c + d*x]^3)/(64*d) + (a*Cot[c + d*x]*Csc[c + d*x]^5)/(16*d) - (a*
Cot[c + d*x]^3*Csc[c + d*x]^5)/(8*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2691

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a*Sec[e +
 f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[b^2*((n - 1)/(m + n - 1)), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2917

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)
*(x_)]), x_Symbol] :> Dist[a, Int[(g*Cos[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Dist[b/d, Int[(g*Cos[e + f*x
])^p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = a \int \cot ^4(c+d x) \csc ^5(c+d x) \, dx+b \int \cot ^4(c+d x) \csc ^4(c+d x) \, dx \\ & = -\frac {a \cot ^3(c+d x) \csc ^5(c+d x)}{8 d}-\frac {1}{8} (3 a) \int \cot ^2(c+d x) \csc ^5(c+d x) \, dx+\frac {b \text {Subst}\left (\int x^4 \left (1+x^2\right ) \, dx,x,-\cot (c+d x)\right )}{d} \\ & = \frac {a \cot (c+d x) \csc ^5(c+d x)}{16 d}-\frac {a \cot ^3(c+d x) \csc ^5(c+d x)}{8 d}+\frac {1}{16} a \int \csc ^5(c+d x) \, dx+\frac {b \text {Subst}\left (\int \left (x^4+x^6\right ) \, dx,x,-\cot (c+d x)\right )}{d} \\ & = -\frac {b \cot ^5(c+d x)}{5 d}-\frac {b \cot ^7(c+d x)}{7 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{64 d}+\frac {a \cot (c+d x) \csc ^5(c+d x)}{16 d}-\frac {a \cot ^3(c+d x) \csc ^5(c+d x)}{8 d}+\frac {1}{64} (3 a) \int \csc ^3(c+d x) \, dx \\ & = -\frac {b \cot ^5(c+d x)}{5 d}-\frac {b \cot ^7(c+d x)}{7 d}-\frac {3 a \cot (c+d x) \csc (c+d x)}{128 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{64 d}+\frac {a \cot (c+d x) \csc ^5(c+d x)}{16 d}-\frac {a \cot ^3(c+d x) \csc ^5(c+d x)}{8 d}+\frac {1}{128} (3 a) \int \csc (c+d x) \, dx \\ & = -\frac {3 a \text {arctanh}(\cos (c+d x))}{128 d}-\frac {b \cot ^5(c+d x)}{5 d}-\frac {b \cot ^7(c+d x)}{7 d}-\frac {3 a \cot (c+d x) \csc (c+d x)}{128 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{64 d}+\frac {a \cot (c+d x) \csc ^5(c+d x)}{16 d}-\frac {a \cot ^3(c+d x) \csc ^5(c+d x)}{8 d} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(279\) vs. \(2(136)=272\).

Time = 0.12 (sec) , antiderivative size = 279, normalized size of antiderivative = 2.05 \[ \int \cot ^4(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {2 b \cot (c+d x)}{35 d}-\frac {3 a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{512 d}+\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{1024 d}+\frac {a \csc ^6\left (\frac {1}{2} (c+d x)\right )}{512 d}-\frac {a \csc ^8\left (\frac {1}{2} (c+d x)\right )}{2048 d}-\frac {b \cot (c+d x) \csc ^2(c+d x)}{35 d}+\frac {8 b \cot (c+d x) \csc ^4(c+d x)}{35 d}-\frac {b \cot (c+d x) \csc ^6(c+d x)}{7 d}-\frac {3 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{128 d}+\frac {3 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{128 d}+\frac {3 a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{512 d}-\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{1024 d}-\frac {a \sec ^6\left (\frac {1}{2} (c+d x)\right )}{512 d}+\frac {a \sec ^8\left (\frac {1}{2} (c+d x)\right )}{2048 d} \]

[In]

Integrate[Cot[c + d*x]^4*Csc[c + d*x]^5*(a + b*Sin[c + d*x]),x]

[Out]

(-2*b*Cot[c + d*x])/(35*d) - (3*a*Csc[(c + d*x)/2]^2)/(512*d) + (a*Csc[(c + d*x)/2]^4)/(1024*d) + (a*Csc[(c +
d*x)/2]^6)/(512*d) - (a*Csc[(c + d*x)/2]^8)/(2048*d) - (b*Cot[c + d*x]*Csc[c + d*x]^2)/(35*d) + (8*b*Cot[c + d
*x]*Csc[c + d*x]^4)/(35*d) - (b*Cot[c + d*x]*Csc[c + d*x]^6)/(7*d) - (3*a*Log[Cos[(c + d*x)/2]])/(128*d) + (3*
a*Log[Sin[(c + d*x)/2]])/(128*d) + (3*a*Sec[(c + d*x)/2]^2)/(512*d) - (a*Sec[(c + d*x)/2]^4)/(1024*d) - (a*Sec
[(c + d*x)/2]^6)/(512*d) + (a*Sec[(c + d*x)/2]^8)/(2048*d)

Maple [A] (verified)

Time = 0.39 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.15

method result size
derivativedivides \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{8}}-\frac {\cos ^{5}\left (d x +c \right )}{16 \sin \left (d x +c \right )^{6}}-\frac {\cos ^{5}\left (d x +c \right )}{64 \sin \left (d x +c \right )^{4}}+\frac {\cos ^{5}\left (d x +c \right )}{128 \sin \left (d x +c \right )^{2}}+\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{128}+\frac {3 \cos \left (d x +c \right )}{128}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{128}\right )+b \left (-\frac {\cos ^{5}\left (d x +c \right )}{7 \sin \left (d x +c \right )^{7}}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35 \sin \left (d x +c \right )^{5}}\right )}{d}\) \(156\)
default \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{8}}-\frac {\cos ^{5}\left (d x +c \right )}{16 \sin \left (d x +c \right )^{6}}-\frac {\cos ^{5}\left (d x +c \right )}{64 \sin \left (d x +c \right )^{4}}+\frac {\cos ^{5}\left (d x +c \right )}{128 \sin \left (d x +c \right )^{2}}+\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{128}+\frac {3 \cos \left (d x +c \right )}{128}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{128}\right )+b \left (-\frac {\cos ^{5}\left (d x +c \right )}{7 \sin \left (d x +c \right )^{7}}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35 \sin \left (d x +c \right )^{5}}\right )}{d}\) \(156\)
parallelrisch \(\frac {35 \left (\tan ^{16}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +80 b \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-112 b \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-280 \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -560 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +1680 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1680 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b -1680 b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+560 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+280 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +112 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-80 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-35 a}{71680 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}\) \(197\)
risch \(\frac {105 a \,{\mathrm e}^{15 i \left (d x +c \right )}+8960 i b \,{\mathrm e}^{12 i \left (d x +c \right )}-805 a \,{\mathrm e}^{13 i \left (d x +c \right )}-11655 a \,{\mathrm e}^{11 i \left (d x +c \right )}+8960 i b \,{\mathrm e}^{8 i \left (d x +c \right )}-23485 a \,{\mathrm e}^{9 i \left (d x +c \right )}-14336 i b \,{\mathrm e}^{6 i \left (d x +c \right )}-23485 a \,{\mathrm e}^{7 i \left (d x +c \right )}-1792 i b \,{\mathrm e}^{4 i \left (d x +c \right )}-11655 a \,{\mathrm e}^{5 i \left (d x +c \right )}-2048 i b \,{\mathrm e}^{2 i \left (d x +c \right )}-805 a \,{\mathrm e}^{3 i \left (d x +c \right )}+256 i b +105 a \,{\mathrm e}^{i \left (d x +c \right )}}{2240 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{8}}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{128 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{128 d}\) \(222\)

[In]

int(cos(d*x+c)^4*csc(d*x+c)^9*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(a*(-1/8/sin(d*x+c)^8*cos(d*x+c)^5-1/16/sin(d*x+c)^6*cos(d*x+c)^5-1/64/sin(d*x+c)^4*cos(d*x+c)^5+1/128/sin
(d*x+c)^2*cos(d*x+c)^5+1/128*cos(d*x+c)^3+3/128*cos(d*x+c)+3/128*ln(csc(d*x+c)-cot(d*x+c)))+b*(-1/7/sin(d*x+c)
^7*cos(d*x+c)^5-2/35/sin(d*x+c)^5*cos(d*x+c)^5))

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 239, normalized size of antiderivative = 1.76 \[ \int \cot ^4(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x)) \, dx=\frac {210 \, a \cos \left (d x + c\right )^{7} - 770 \, a \cos \left (d x + c\right )^{5} - 770 \, a \cos \left (d x + c\right )^{3} + 210 \, a \cos \left (d x + c\right ) - 105 \, {\left (a \cos \left (d x + c\right )^{8} - 4 \, a \cos \left (d x + c\right )^{6} + 6 \, a \cos \left (d x + c\right )^{4} - 4 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 105 \, {\left (a \cos \left (d x + c\right )^{8} - 4 \, a \cos \left (d x + c\right )^{6} + 6 \, a \cos \left (d x + c\right )^{4} - 4 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 256 \, {\left (2 \, b \cos \left (d x + c\right )^{7} - 7 \, b \cos \left (d x + c\right )^{5}\right )} \sin \left (d x + c\right )}{8960 \, {\left (d \cos \left (d x + c\right )^{8} - 4 \, d \cos \left (d x + c\right )^{6} + 6 \, d \cos \left (d x + c\right )^{4} - 4 \, d \cos \left (d x + c\right )^{2} + d\right )}} \]

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^9*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/8960*(210*a*cos(d*x + c)^7 - 770*a*cos(d*x + c)^5 - 770*a*cos(d*x + c)^3 + 210*a*cos(d*x + c) - 105*(a*cos(d
*x + c)^8 - 4*a*cos(d*x + c)^6 + 6*a*cos(d*x + c)^4 - 4*a*cos(d*x + c)^2 + a)*log(1/2*cos(d*x + c) + 1/2) + 10
5*(a*cos(d*x + c)^8 - 4*a*cos(d*x + c)^6 + 6*a*cos(d*x + c)^4 - 4*a*cos(d*x + c)^2 + a)*log(-1/2*cos(d*x + c)
+ 1/2) + 256*(2*b*cos(d*x + c)^7 - 7*b*cos(d*x + c)^5)*sin(d*x + c))/(d*cos(d*x + c)^8 - 4*d*cos(d*x + c)^6 +
6*d*cos(d*x + c)^4 - 4*d*cos(d*x + c)^2 + d)

Sympy [F(-1)]

Timed out. \[ \int \cot ^4(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x)) \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**4*csc(d*x+c)**9*(a+b*sin(d*x+c)),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.01 \[ \int \cot ^4(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x)) \, dx=\frac {35 \, a {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{7} - 11 \, \cos \left (d x + c\right )^{5} - 11 \, \cos \left (d x + c\right )^{3} + 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{8} - 4 \, \cos \left (d x + c\right )^{6} + 6 \, \cos \left (d x + c\right )^{4} - 4 \, \cos \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - \frac {256 \, {\left (7 \, \tan \left (d x + c\right )^{2} + 5\right )} b}{\tan \left (d x + c\right )^{7}}}{8960 \, d} \]

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^9*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/8960*(35*a*(2*(3*cos(d*x + c)^7 - 11*cos(d*x + c)^5 - 11*cos(d*x + c)^3 + 3*cos(d*x + c))/(cos(d*x + c)^8 -
4*cos(d*x + c)^6 + 6*cos(d*x + c)^4 - 4*cos(d*x + c)^2 + 1) - 3*log(cos(d*x + c) + 1) + 3*log(cos(d*x + c) - 1
)) - 256*(7*tan(d*x + c)^2 + 5)*b/tan(d*x + c)^7)/d

Giac [A] (verification not implemented)

none

Time = 0.38 (sec) , antiderivative size = 201, normalized size of antiderivative = 1.48 \[ \int \cot ^4(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x)) \, dx=\frac {35 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 80 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 112 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 280 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 560 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1680 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 1680 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {4566 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 1680 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 560 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 280 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 112 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 80 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 35 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8}}}{71680 \, d} \]

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^9*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/71680*(35*a*tan(1/2*d*x + 1/2*c)^8 + 80*b*tan(1/2*d*x + 1/2*c)^7 - 112*b*tan(1/2*d*x + 1/2*c)^5 - 280*a*tan(
1/2*d*x + 1/2*c)^4 - 560*b*tan(1/2*d*x + 1/2*c)^3 + 1680*a*log(abs(tan(1/2*d*x + 1/2*c))) + 1680*b*tan(1/2*d*x
 + 1/2*c) - (4566*a*tan(1/2*d*x + 1/2*c)^8 + 1680*b*tan(1/2*d*x + 1/2*c)^7 - 560*b*tan(1/2*d*x + 1/2*c)^5 - 28
0*a*tan(1/2*d*x + 1/2*c)^4 - 112*b*tan(1/2*d*x + 1/2*c)^3 + 80*b*tan(1/2*d*x + 1/2*c) + 35*a)/tan(1/2*d*x + 1/
2*c)^8)/d

Mupad [B] (verification not implemented)

Time = 10.43 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.51 \[ \int \cot ^4(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{128\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{256\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{2048\,d}-\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{128\,d}-\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{640\,d}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{896\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (6\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-\frac {2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{5}+\frac {2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{7}+\frac {a}{8}\right )}{256\,d}+\frac {3\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{128\,d} \]

[In]

int((cos(c + d*x)^4*(a + b*sin(c + d*x)))/sin(c + d*x)^9,x)

[Out]

(3*b*tan(c/2 + (d*x)/2))/(128*d) - (a*tan(c/2 + (d*x)/2)^4)/(256*d) + (a*tan(c/2 + (d*x)/2)^8)/(2048*d) - (b*t
an(c/2 + (d*x)/2)^3)/(128*d) - (b*tan(c/2 + (d*x)/2)^5)/(640*d) + (b*tan(c/2 + (d*x)/2)^7)/(896*d) - (cot(c/2
+ (d*x)/2)^8*(a/8 + (2*b*tan(c/2 + (d*x)/2))/7 - a*tan(c/2 + (d*x)/2)^4 - (2*b*tan(c/2 + (d*x)/2)^3)/5 - 2*b*t
an(c/2 + (d*x)/2)^5 + 6*b*tan(c/2 + (d*x)/2)^7))/(256*d) + (3*a*log(tan(c/2 + (d*x)/2)))/(128*d)